<template>
  <quick :data="left" v-if="left.length"></quick>
  <li>{{flag}}{{this.$slots.default}}</li>
  <quick :data="right" v-if="right.length"></quick>
</template>

<script>
export default {
  name: 'quick',
  props: ['data'],
  setup(props){
      let flag = props.data[0];
      let left = [];
      let right = [];
      props.data.slice(1).forEach(item => {
          item > flag ? right.push(item) : left.push(item)
      });
      return {left, flag, right}
  }
}
</script>
